<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<h:head>
</h:head>
<ui:composition>
<h:body>

<h:form id="form" prependId="false">  
  
    <p:dataTable id="dataTable" var="dep" value="#{departamentoBean.listado}"  
                 paginator="true" rows="10"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="5,10,15"
                 rowKey="#{dep.idDepartamento}"
                 selection="#{departamentoBean.selectDepartamento}" 
                 selectionMode="single">  
        <f:facet name="header">  
        Listado Departamento
        </f:facet>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="ID" />  
            </f:facet>  
            <h:outputText value="#{dep.idDepartamento}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Nombre" />  
            </f:facet>  
            <h:outputText value="#{dep.nombre}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Descripcion" />  
            </f:facet>  
            <h:outputText value="#{dep.descripcion}" />  
        </p:column>  
         
          
        <f:facet name="footer">
         <p:commandButton value="Agregar"  update=":panelContent">
          <f:setPropertyActionListener target="#{navigationBean.urlNavigation}" value="addDepartamento">
          </f:setPropertyActionListener>
         </p:commandButton>
         
         
         </f:facet>  
    
    </p:dataTable>  
    </h:form>
    
</h:body>
</ui:composition>
</html>